<template>
	<view>
		<back :showBackText="false" customClass="bg-gradual-blue text-white" title="分享记录"></back>
		<view class="cu-list menu" v-if="isLoad">
			<view class="margin-bottom" v-for="(item,index) in list" :key="index">
				<view class="flex solid-bottom  justify-between bg-white">
					<view class=" padding-sm margin-xs radius">
						<view class="cu-capsule radius">
							<view class="cu-tag bg-gradual-blue">编号</view>
							<view class="cu-tag line-blue">{{item.id}}</view>
						</view>
					</view>
					<view class=" padding-sm margin-xs radius">
						<view class="cu-capsule radius">
							<view class="cu-tag bg-blue">
								{{item.name}}
							</view>
						</view>
					</view>
				</view>
				<view class="cu-list menu solid-top" style="margin-top: 0;">
					<view class="cu-item">
						<view class="content">
							<text class="cuIcon-timefill text-orange"></text>
							<text class="text-black">提交时间</text>
						</view>
						<view class="action">
							<view class="cu-tag round bg-green light">{{item.create_time}}</view>
						</view>
					</view>
				</view>
				<view class="cu-list menu solid-top" style="margin-top: 0;">
					<view class="cu-item">
						<view class="content">
							<text class="cuIcon-tagfill text-orange"></text>
							<text class="text-black">审核状态</text>
						</view>
						<view class="action">
							<view class="cu-tag round bg-green light">{{item.status_name}}</view>
						</view>
					</view>
				</view>
				<view class="cu-list menu solid-top" style="margin-top: 0;">
					<view class="cu-item">
						<view class="content">
							<text class="cuIcon-selectionfill text-orange"></text>
							<text class="text-black">分享内容</text>
						</view>
					</view>
					<view class="padding bg-white">
						<view class="text-left text-green "
							style="font-size: 26rpx;color:#39b54a;background-color: #d7f0dbff;border-radius: 15rpx;padding: 15rpx;">
							{{item.content}}
						</view>
					</view>
				</view>
				<view class="cu-list menu solid-top" style="margin-top: 0;" v-if="item.opinion">
					<view class="cu-item ">
						<view class="content">
							<text class="cuIcon-messagefill text-orange"></text>
							<text class="text-black">审核意见</text>
						</view>
					</view>
					<view class="padding bg-white solid-top">
						<view class="text-left text-green "
							style="font-size: 26rpx;color:#39b54a;background-color: #d7f0dbff;border-radius: 15rpx;padding: 15rpx;">
							{{item.opinion}}
						</view>
					</view>
				</view>
			</view>
			<empty v-if="list.length == 0" info="您暂时未分享过资料" showAd="false"></empty>
		</view>
	</view>
</template>

<script>
	let app = getApp();
	let that = null;
	export default {
		data() {
			return {
				list: [],
				isLoad: false,
			};
		},
		onLoad(options) {
			that = this;
			that.getInfo();
		},
		onShow(options) {},
		methods: {
			async getInfo() {
				let res = await app.globalData.service.getMaterialShareList();
				that.list = res.data;
				that.isLoad = true;
			},
		}
	};
</script>
<style src="./detail.css"></style>